package com.atguigu07.encapsulation.exer3;


/**
 * ClassName: Employee
 * Package: com.atguigu07.encapsulation.exer3
 * Description:
 * 声明员工类Employee
 * 包含属性：姓名、性别、年龄、电话，属性私有化
 * 提供get/set方法
 * 提供String getInfo()方法
 *
 * @Author 姜
 * @Create 2023/11/20 17:17
 * @Version 1.0
 */
public class Employee {
    private String name;
    private char gender;
    private int age;
    private String phone;

    public void setName(String name) {
        this.name = name;
    }

    public String getName() {
        return this.name;
    }

    public void setGender(char gender) {
        this.gender = gender;
    }

    public char getGender() {
        return this.gender;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public int getAge() {
        return this.age;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getPhone() {
        return this.phone;
    }

    public String getInfo() {
//        return "姓名: " + name + ", 性别: " + gender + ", 年龄 : " + age + ", 电话 : " + phone;
        return name + "\t" + gender + "\t" + age + "\t" + phone;
    }
}
